package com.ldzl.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ldzl.pojo.CkStockTaking;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 库存盘点Mapper接口
 */
@Mapper
public interface CkStockTakingMapper extends BaseMapper<CkStockTaking> {

    /**
     * 查询库存盘点列表
     * 
     * @param ckStockTaking 库存盘点
     * @return 库存盘点集合
     */
    List<CkStockTaking> selectCkStockTakingList(CkStockTaking ckStockTaking);
    
    /**
     * 查询库存盘点详细信息
     * 
     * @param takingId 库存盘点ID
     * @return 库存盘点
     */
    CkStockTaking selectCkStockTakingById(Long takingId);
    
    /**
     * 新增库存盘点
     * 
     * @param ckStockTaking 库存盘点
     * @return 结果
     */
    int insertCkStockTaking(CkStockTaking ckStockTaking);
    
    /**
     * 修改库存盘点
     * 
     * @param ckStockTaking 库存盘点
     * @return 结果
     */
    int updateCkStockTaking(CkStockTaking ckStockTaking);
    
    /**
     * 删除库存盘点
     * 
     * @param takingId 库存盘点ID
     * @return 结果
     */
    int deleteCkStockTakingById(Long takingId);
    
    /**
     * 批量删除库存盘点
     * 
     * @param takingIds 需要删除的数据ID
     * @return 结果
     */
    int deleteCkStockTakingByIds(Long[] takingIds);
    
    /**
     * 更新盘点单状态
     * 
     * @param takingId 盘点单ID
     * @param status 状态
     * @param approveStatus 审核状态
     * @return 结果
     */
    int updateStatus(@Param("takingId") Long takingId, @Param("status") String status, @Param("approveStatus") String approveStatus);
} 